<?php
header("Content-Type: text/html; charset=utf8");
// change the following paths if necessary
define ( 'ROOT', dirname ( __FILE__ ) );
$version = '1.1.13';
// $version = '1.1.6';
$yii = ROOT . '/../framework.'.$version.'/yii.php';
$config = ROOT . '/protected/config/main.php';
defined ( 'DS' ) or define ( 'DS', DIRECTORY_SEPARATOR );
// remove the following lines when in production mode
defined ( 'YII_DEBUG' ) or define ( 'YII_DEBUG', true );
// specify how many levels of call stack should be shown in each log message
defined ( 'YII_TRACE_LEVEL' ) or define ( 'YII_TRACE_LEVEL', 3 );

require_once ($yii); 
// lib库使用别名访问
// Yii::setPathOfAlias ( 'lib', Yii::getPathOfAlias ( 'application.lib' ) );

// Yii::setPathOfAlias('Imagine',Yii::getPathOfAlias('application.vendors.Imagine'));
// include Init Data
// require_once('init.php');

/*if (PHP_VERSION < '5.4')
{
	exit ( '本系统在PHP 5.4或更高版本的才能正常运行！' );
}*/
// Set path alias to the library, sources, classes and zend
// 将该目录设置别名
Yii::setPathOfAlias ( 'library', ROOT . 'Library' ); // 使用Yii::getPathOfAlias('library');取得别名路径
Yii::createWebApplication ( $config )->run ();
// print_r(Yii::app()->db->createCommand("something"));

// 在页面的下角显示页面执行时间
//if (YII_DEBUG_DISPLAY_TIME)
//{
	// echo Yii::getLogger ()->getExecutionTime ();
//}
/*
//debug 调试模式
defined('YII_DEBUG') or define('YII_DEBUG',true );
//show profiler 显示日志
defined('YII_DEBUG_SHOW_PROFILER') or define('YII_DEBUG_SHOW_PROFILER',true);
//enable profiling开启日志
defined('YII_DEBUG_PROFILING') or define('YII_DEBUG_PROFILING',true);
//trace level 调试跟踪
defined('YII_TRACE_LEVEL') or define('YII_TRACE_LEVEL',0);
//trace level 程序执行时间
defined('YII_DEBUG_DISPLAY_TIME') or define('YII_DEBUG_DISPLAY_TIME',false);
*/